home *** CD-ROM | disk | FTP | other *** search
/ Aminet 34 / Aminet 34 (2000)(Schatztruhe)[!][Dec 1999].iso / Aminet / dev / debug / Vivid.readme < prev    next >
Encoding:
Text File  |  1999-11-06  |  6.4 KB  |  174 lines

  1. Short:    Trace the origin of memory flushes.
  2. Author:   andrew.ab2000@bigfoot.com (Andrew Bell)
  3. Uploader: andrew.ab2000@bigfoot.com (Andrew Bell)
  4. Type:     dev/debug
  5. Requires: AmigaOS 3.0 or better.
  6.  
  7. Visit my homepage at: http://www2.prestel.co.uk/ab2000 
  8.  
  9. ------------------------------
  10.  Introduction
  11. ------------------------------
  12.  
  13.  Vivid is a simple tool (much like Enforcer) that allows the user to monitor
  14.  the origin of memory flushes. This tool is really for the advanced Amiga
  15.  user, but can be used by anyone who is curious about what task or process
  16.  is flushing the memory.
  17.  
  18.  It does this by installing a dummy low memory handler onto the system. So
  19.  every time a memory allocation fails (i.e. AllocMem() or AllocVec() returns
  20.  a NULL), the system will attempt to flush as much memory as possible by
  21.  traversing the list of installed low memory handlers, calling each of them.
  22.  When the dummy handler installed by Vivid is called, it will collect as
  23.  much information about the task that triggered the flush, then print this
  24.  information to the Shell window.
  25.  
  26.  Typically, a program flushes the memory by calling AllocMem(~0,MEMF_ANY)
  27.  or similar.
  28.  
  29.  The full C source code has been included for the curious.
  30.  
  31. ------------------------------
  32.  DISCLAIMER
  33. ------------------------------
  34.  
  35.  FOR THE PURPOSE OF THIS DISCLAIMER, "SOFTWARE" REFERS TO ALL THE FILES
  36.  PROVIDED IN THE ORIGINAL ARCHIVE DISTRIBUTED BY THE AUTHOR.
  37.  
  38.  THIS DISCLAIMER APPLIES TO ALL WHO USE THIS SOFTWARE.
  39.  
  40.  THE AUTHOR HAS DONE HIS BEST TO ENSURE THAT THIS SOFTWARE IS FREE FROM
  41.  DEFECTS, ALTHOUGH THE AUTHOR CANNOT GUARANTEE THIS. THE AUTHOR HEREBY
  42.  REJECTS ANY LIABILITY OR RESPONSIBILITY FOR THESE OR OTHER CONSEQUENCES
  43.  FROM THE USE OF THIS SOFTWARE. THIS INCLUDES, BUT IS NOT LIMITED TO,
  44.  DAMAGE TO YOUR EQUIPMENT, TO YOUR DATA, TO OTHER COMPUTERS / DEVICES
  45.  YOUR COMPUTER IS CONNECTED TO, PERSONNAL INJURY, FINANCIAL LOSS OR OTHER
  46.  EFFECTS.
  47.  
  48.  THIS SOFTWARE IS PROVIDED AS-IS. THIS MEANS THE AUTHOR CANNOT GUARANTEE
  49.  THAT IT IS FIT FOR ANY SPECIFIC PURPOSE AND THE AUTHOR DOES NOT GUARANTEE
  50.  BUG FIXES, UPDATES OR HELP DURING ERROR RECOVERY.
  51.  
  52.  (After all, you did get it for free!)
  53.  
  54. ------------------------------
  55.  Distribution
  56. ------------------------------
  57.  
  58.  This software is emailware, which means that this archive can be freely
  59.  distributed provided it's components are not altered or deleted by anyone
  60.  other than the copyright holder (Andrew Bell). It also means if you use
  61.  the software often you should send the author an email with some feedback.
  62.  
  63.  Distribution via diskette, CD-ROM or other electronic medium is allowed
  64.  provided that the archive is distributed in it's original state, and that
  65.  the end user is not charged for this software (although you are allowed to
  66.  charge them for the medium it is supplied on, this cost must not exceed £5
  67.  UK pounds).
  68.  
  69.  If you are going to distribute this software via a magazine cover mounted
  70.  medium, I recommend that you contact the author for the latest version of
  71.  the software. The address is provided below.
  72.  
  73. ------------------------------
  74.  Usage
  75. ------------------------------
  76.  
  77.  To start Vivid, run it from a Shell window. That's all you need to do, no
  78.  complicated Shell paramteres are required. The next time something attempts
  79.  to flush the memory, the following information will be dumped to the Shell
  80.  window:
  81.  
  82.  ·The number and date of the memory flush.
  83.  ·The task pointer and name of the task that triggered the flush.
  84.  ·The size of memory requested (Taken from the MemHandlerData structure).
  85.  ·The flags for the requested memory (also from the MemHandlerData
  86.   structure).
  87.  ·The flags for the MemHandlerData structure itself.
  88.  
  89.  Here is an an example of the output:
  90.  
  91.  (START OF EXAMPLE)
  92.  
  93.  Vivid 1.0 (20.10.99), Copyright © 1999 Andrew Bell. All rights reserved.
  94.  Vivid has been installed. Press `Control + C' to break out.
  95.  
  96.  A memory flush has been detected (no. 001) : Wednesday 20-Oct-99 01:23:58
  97.  Low mem handler was triggered by task: 0x785C50B8 (FlushTest)
  98.  memh_RequestSize  = 0xFFFFFFFF
  99.  memh_RequestFlags = 0x00010002 (MEMF_CHIP, MEMF_CLEAR)
  100.  memh_Flags        = 0x00000000 (No flags given)
  101.  
  102.  (END OF EXAMPLE)
  103.  
  104.  The last three line that start with memh_* will only be of use to
  105.  programmers. It show the information that was passed via the MemHandlerData
  106.  parameter when the dummy handler was called.
  107.  
  108. ------------------------------
  109.  Options
  110. ------------------------------
  111.  
  112.  PRIORITY/N
  113.  
  114.   This option allows you to specify the priority of the dummy memory
  115.   handler, that is installed by Vivid. If this parameter is not provided,
  116.   Vivid will default to a priority of 25.
  117.  
  118.  REQ/S
  119.  
  120.   Tell Vivid to force it's output to a requester instead of using the
  121.   Shell. Warning, this option is quite annoying. :)
  122.  
  123. ------------------------------
  124.  Limitations
  125. ------------------------------
  126.  
  127.  Vivid will only be able to catch memory flushes that are triggered via
  128.  exec.library's low memory handlers. It will not work with tasks that
  129.  manually traverse the system library list (etc.), calling the Expunge()
  130.  vector of each one.
  131.  
  132.  To be absolutely safe, you should *NOT* keep Vivid running in the back-
  133.  ground *ALL THE TIME*. It's only for debugging purposes. So don't be
  134.  installing it into your user-startup or startup-sequence, unless you know
  135.  what you're doing.
  136.  
  137. ------------------------------
  138.  Copyright
  139. ------------------------------
  140.  
  141.  This program and all related files are Copyright © 1999 Andrew Bell.
  142.  All rights reserved.
  143.  
  144.  This program is EMAILWARE, if you use it often, please send the author an
  145.  email (my email address is provided below).
  146.  
  147.  Feal free to send suggestions or ideas on how I could improve this program.
  148.  
  149.  Thanks.
  150.  
  151. ------------------------------
  152.  The author
  153. ------------------------------
  154.  
  155.  My name is Andrew Bell, and I can be contacted via electronic mail at
  156.  andrew.ab2000@bigfoot.com.
  157.  
  158.  You can also visit my webpage at: http://www2.prestel.co.uk/ab2000 for
  159.  the latest updates of this program and to see my other work.
  160.  
  161.  Enjoy! :) Andrew.
  162.  
  163.  
  164. ============================= Archive contents =============================
  165.  
  166. Original  Packed Ratio    Date     Time    Name
  167. -------- ------- ----- --------- --------  -------------
  168.    12996    3896 70.0% 20-Oct-99 02:57:08 +Vivid.c
  169.      466     198 57.5% 20-Oct-99 02:57:08 +Vivid_rev.h
  170.     8176    5098 37.6% 20-Oct-99 02:57:08 +Vivid
  171.     6009    2670 55.5% 20-Oct-99 02:57:08 +Vivid.readme
  172. -------- ------- ----- --------- --------
  173.    27647   11862 57.0% 21-Oct-99 21:00:04   4 files
  174.